<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>event5</title>
<script src="js/vue.min.js"></script>
</head>
<body>
<div id="app">
	<input type="button" value="单击后增加" @click="m +=1">
	<input type="button" value="绑定函数的按钮" @click="add">
	<input type="button" value="绑定可传值函数的按钮" @click="add2(3,4)">
	<div>这个按钮被点击了 {{ m }} 。</div>
</div>

<script>
new Vue({
	el: '#app',
	data: {
		m:0
	},
	methods:{
		add:function(e){
			e.stopPropagation();
			this.m +=2;
		},
		add2:function(m,n){
			this.m=m+n;
		}
	}
})
</script>
</body>
</html>